;(function (window) {

var pageLogic = {
    init: {
        before: function () {
            var columns = [
                {field: "checked", checkbox: true},
                {field: "num", title: "序号", width: 5, align: "center", formatter: common.formatter.index},
                {field: "id", visible: false},
                {field: "hdbm", title: "航道编码", width: 80, align: "center"},
                {field: "hdmc", title: "航道名称", width: 80, align: "center"},
                {field: "simpleName", title: "管理单位", width: 80, align: "center"},
                {field: "qdmc", title: "起点名称", width: 80, align: "center"},
                {field: "zdmc", title: "终点名称", width: 80, align: "center"},
            ];

            common.initTable(columns);
        },

        layout: function() {
            common.layout();
        },
        after: function () {
            //创建模态窗口
            common.modal(pageLogic.initData.modalParams[0], {
            rules: {
                hdbm: {required:true,maxLen:20},
                hdmc: {required:true,maxLen:50},
                gldw: {required:true}
            },

            messages: {}
            });

            $("#gldw").selectTree({
                url: masterpage.ctxp + "/sys/orgs/-1/tree"
            });$("#gldw").selectTree({
                url: masterpage.ctxp + "/sys/orgs/-1/tree"
            });

        },
        //页面控件事件绑定(一般为按钮的事件绑定)
        events: function () {
            common.registerEvents();
        },

        load: function () {
            common.search();
        }
    }
};

pageLogic.formatter = {};

window.pageLogic = pageLogic;
})(window);
